/*******************************************************************************
* Project: QSAR(Cute Software Architecture) 
*
* Copyright: Copyright(C) 2024 by YuetingBen, All Rights Reserved
*
* File name: DcmDsd.c
*
* Brief: ;
*
* Author: Yueting.Ben
*
* Module: DCMDSD
*
* Revision:
* --------------------------------------------------------------------------------
* v0.1: 
* --Yueting.Ben, 2024-03-12 
* --Initial release

**********************************************************************************/

/** HEADER FILES **/
#include "DcmDsdCfg.h"
#include "DcmDspSvc10.h"
#include "DcmDspSvc11.h"
#include "DcmDspSvc14.h"
#include "DcmDspSvc19.h"
#include "DcmDspSvc22.h"
#include "DcmDspSvc27.h"
#include "DcmDspSvc28.h"
#include "DcmDspSvc2E.h"
#include "DcmDspSvc2F.h"
#include "DcmDspSvc31.h"
#include "DcmDspSvc3E.h"
#include "DcmDspSvc85.h"


/** MACRO DEFINITION **/
#define DCM_SVC_SUB_NUM_NULL       0u

/** TYPEDEF DEFINITION **/


/** LOCAL DATA DECLARATION **/
const Dcm_SubSvcCfgType svc10SubFuncCfg[DCM_SVC_SUB_ID_10_MAX];
const Dcm_SubSvcCfgType svc19SubFuncCfg[DCM_SVC_SUB_ID_19_MAX];
const Dcm_SubSvcCfgType svc27SubFuncCfg[DCM_SVC_SUB_ID_27_MAX];

const Dcm_SvcCfgType Dcm_SvcCfg[DCM_SVC_ID_MAX];


/** LOCAL DATA **/
const Dcm_SubSvcCfgType svc10SubFuncCfg[DCM_SVC_SUB_ID_10_MAX] = 
{
    {0x01, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc10_01_Processor},
    {0x02, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLev1, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc10_02_Processor},
    {0x03, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc10_03_Processor},
};

const Dcm_SubSvcCfgType svc28SubFuncCfg[DCM_SVC_SUB_ID_28_MAX] = 
{
    {0x00, {(DcmDspSessionCfgType*)&DcmDspExtendedSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc28_00_Processor},
    {0x03, {(DcmDspSessionCfgType*)&DcmDspExtendedSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc28_03_Processor},
};

const Dcm_SubSvcCfgType svc27SubFuncCfg[DCM_SVC_SUB_ID_27_MAX] = 
{
    {0x01, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc27_01_Processor},
    {0x02, {(DcmDspSessionCfgType*)&DcmDspExtendedSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc27_02_Processor},
    {0x03, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLev1, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc27_03_Processor},
    {0x04, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLev1, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc27_04_Processor}
};

const Dcm_SubSvcCfgType svc19SubFuncCfg[DCM_SVC_SUB_ID_19_MAX] = 
{
    {0x01, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc19_01_Processor},
    {0x02, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc19_02_Processor},
    {0x04, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc19_04_Processor},
    {0x06, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc19_06_Processor},
    {0x0A, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc19_0A_Processor}
};

const Dcm_SubSvcCfgType svc3ESubFuncCfg[DCM_SVC_SUB_ID_3E_MAX] = 
{
    {0x00, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc3E_00_Processor},
};

const Dcm_SubSvcCfgType svc85SubFuncCfg[DCM_SVC_SUB_ID_85_MAX] = 
{
    {0x01, {(DcmDspSessionCfgType*)&DcmDspExtendedSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc85_01_Processor},
    {0x02, {(DcmDspSessionCfgType*)&DcmDspExtendedSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLocked, NULL_PTR, NULL_PTR}, 2, 2, DcmDsp_Svc85_02_Processor},
};

const Dcm_SvcCfgType Dcm_SvcCfg[DCM_SVC_ID_MAX] = 
{
    {0x10, DCMDSPSVC10_REQ_DATA_MINLENGTH, {NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, SET, DCM_SVC_SUB_ID_10_MAX, (Dcm_SubSvcCfgType*)svc10SubFuncCfg, NULL_PTR},  /* DCM_SVC_ID_10 */
    {0x11, DCMDSPSVC11_REQ_DATA_MINLENGTH, {NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, RESET, DCM_SVC_SUB_ID_10_MAX, (Dcm_SubSvcCfgType*)svc10SubFuncCfg, NULL_PTR}, /* DCM_SVC_ID_11 */
    {0x14, DCMDSPSVC14_REQ_DATA_MINLENGTH, {NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, RESET, DCM_SVC_SUB_ID_10_MAX, (Dcm_SubSvcCfgType*)DCM_SVC_SUB_NUM_NULL, DcmDsp_Svc14_Processor}, /* DCM_SVC_ID_14 */
    {0x19, DCMDSPSVC19_REQ_DATA_MINLENGTH, {NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, SET, DCM_SVC_SUB_ID_19_MAX, (Dcm_SubSvcCfgType*)svc19SubFuncCfg, NULL_PTR}, /* DCM_SVC_ID_19 */
    {0x22, DCMDSPSVC22_REQ_DATA_MINLENGTH, {(DcmDspSessionCfgType*)&DcmDspDefaultSession, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, RESET, DCM_SVC_SUB_NUM_NULL, NULL_PTR, DcmDsp_Svc22_Processor}, /* DCM_SVC_ID_22 */
    {0x28, DCMDSPSVC28_REQ_DATA_MINLENGTH, {NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, SET, DCM_SVC_SUB_ID_28_MAX, (Dcm_SubSvcCfgType*)svc28SubFuncCfg, NULL_PTR}, /* DCM_SVC_ID_28 */
    {0x27, DCMDSPSVC27_REQ_DATA_MINLENGTH, {NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, SET, DCM_SVC_SUB_ID_27_MAX, (Dcm_SubSvcCfgType*)svc27SubFuncCfg, NULL_PTR}, /* DCM_SVC_ID_27 */
    {0x2E, DCMDSPSVC2E_REQ_DATA_MINLENGTH, {(DcmDspSessionCfgType*)&DcmDspExtendedSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLev1, NULL_PTR, NULL_PTR}, RESET, DCM_SVC_SUB_NUM_NULL, NULL_PTR, DcmDsp_Svc2E_Processor}, /* DCM_SVC_ID_22 */
    {0x2F, DCMDSPSVC2F_REQ_DATA_MINLENGTH, {(DcmDspSessionCfgType*)&DcmDspExtendedSession, NULL_PTR, NULL_PTR}, {(DcmDspSecurityRowType*)&DcmDspSecurityLev1, NULL_PTR, NULL_PTR}, RESET, DCM_SVC_SUB_NUM_NULL, NULL_PTR, DcmDsp_Svc2F_Processor}, /* DCM_SVC_ID_2F */
    {0x31, DCMDSPSVC31_REQ_DATA_MINLENGTH, {(DcmDspSessionCfgType*)&DcmDspExtendedSession, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, RESET, DCM_SVC_SUB_NUM_NULL, NULL_PTR, DcmDsp_Svc31_Processor}, /* DCM_SVC_ID_31 */
    {0x3E, DCMDSPSVC3E_REQ_DATA_MINLENGTH, {NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, SET, DCM_SVC_SUB_ID_3E_MAX, (Dcm_SubSvcCfgType*)svc3ESubFuncCfg, NULL_PTR}, /* DCM_SVC_ID_3E */
    {0x85, DCMDSPSVC85_REQ_DATA_MINLENGTH, {NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, SET, DCM_SVC_SUB_ID_85_MAX, (Dcm_SubSvcCfgType*)svc85SubFuncCfg, NULL_PTR}, /* DCM_SVC_ID_85 */
};

const Dcm_SvcCfgType Dcm_SvcFuncCfg[4u] = 
{
    {0x10, DCMDSPSVC10_REQ_DATA_MINLENGTH, {NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, SET, DCM_SVC_SUB_ID_10_MAX, (Dcm_SubSvcCfgType*)svc10SubFuncCfg, NULL_PTR},  /* DCM_SVC_ID_10 */
    {0x11, DCMDSPSVC11_REQ_DATA_MINLENGTH, {NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, RESET, DCM_SVC_SUB_ID_10_MAX, (Dcm_SubSvcCfgType*)svc10SubFuncCfg, NULL_PTR}, /* DCM_SVC_ID_11 */
    {0x14, DCMDSPSVC14_REQ_DATA_MINLENGTH, {NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, RESET, DCM_SVC_SUB_ID_10_MAX, (Dcm_SubSvcCfgType*)DCM_SVC_SUB_NUM_NULL, DcmDsp_Svc14_Processor}, /* DCM_SVC_ID_14 */
    {0x85, DCMDSPSVC85_REQ_DATA_MINLENGTH, {NULL_PTR, NULL_PTR, NULL_PTR}, {NULL_PTR, NULL_PTR, NULL_PTR}, SET, DCM_SVC_SUB_ID_85_MAX, (Dcm_SubSvcCfgType*)svc85SubFuncCfg, NULL_PTR}, /* DCM_SVC_ID_85 */
};


